package cn.u313.comm.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RgexUtil {
    public static String toRgex(String soap, String rgex) {
        Matcher m = Pattern.compile(rgex).matcher(soap);
        if (m.find()) {
            return m.group(1);
        }
        return null;
    }

    public static String subStrToStr(String s, String s1, String msg) {
        return toRgex(msg,s+"(.*?)"+s1);
    }
}
